home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / bcf7713b.zip / ENGLISH.TXT < prev    next >
Text File  |  1992-12-01  |  13KB  |  358 lines

  1.              ╔═══════════════════════════════════════════════════╗
  2.              ║                 BC-FORTRAN77 Vers 1.3b            ║
  3.              ║      copyright: Andre Koestli                     ║
  4.              ║           1990  Martin Luther Str.63              ║
  5.              ║                 D700 Stuttgart 50                 ║
  6.              ╠═══════════════════════════════════════════════════╣
  7.              ║Version "b" of BC-FORTRAN77, comprised of the 5    ║
  8.              ║files described later, is programmed entirely by   ║
  9.              ║me. I permit free use of version "b" for non-      ║
  10.              ║commercial applications, with all rights remaining ║
  11.              ║with me, in particular the sale of version b       ║
  12.              ║together with other products is not allowed.  Every║
  13.              ║copy must include this text unchanged.  Use for    ║
  14.              ║military purposes or corresponding research is     ║
  15.              ║forbidden!                                         ║
  16.              ║July 1990                                A. Koestli║
  17.              ╚═══════════════════════════════════════════════════╝
  18.  
  19. BC-FORTRAN77 Version b consists of a compiler, linker, module library and a 
  20. resident run-time system, which also contains a simple debugger.  This version 
  21. runs on an MS-DOS computer with 640kB RAM.  A hard disk is not required.  A 
  22. compiler for a programming course should become available as a result of this.  
  23. Then will come the corresponding compiler for the Atari ST and Amiga. 
  24.  
  25. I will still answer inquiries for sending another or newer version if 20 
  26. Deutchmarks (currency or check) to cover expenses for diskette, mailer, 
  27. postage and time is included.  I only send 3 1/2" diskettes. 
  28.  
  29. BC-FORTRAN77 version b consists of the following parts:
  30.  
  31.     LIES.TXT   This text
  32.     BCF.EXE    Compiler
  33.     BCL.EXE    Linker
  34.     BCRTSY.EXE Resident run-time system
  35.     LIB.B      Library of standard functions
  36.  
  37. When a copy is made all of the parts mentioned above must be included.
  38.  
  39. Installation.
  40. -------------
  41.  
  42. BEFORE the compiler, linker or program is started, the resident run-time 
  43. system MUST be loaded.  For this, just run the program BCRTSY.EXE. If you use 
  44. BC-FORTRAN77 regularly, place BCRTSY.EXE in your AUTOEXEC.BAT file. 
  45.  
  46. Copy the *.EXE files into a directory contained in the PATH and the LIB.B file 
  47. in an APPEND directory (see the MS-DOS commands PATH and APPEND). 
  48.  
  49. Compiler
  50. --------
  51.  
  52. The compiler is started by 
  53.  
  54.     BCF [-Option...] File...
  55.  
  56. If File does not contain a period, a .F will be appended.  The object file 
  57. will be placed in FILE.B. 
  58.  
  59. Example:
  60.  
  61.     BCF -D TEST.F
  62.  
  63. Compile TEST.F with the debug option into TEST.B
  64.  
  65.     BCF TEST SUB
  66.  
  67. Compile TEST.F into TEST.B and SUB.F into SUB.B
  68.  
  69.     BCF TEST.X
  70.  
  71. Compile TEST.X into TEST.B
  72.  
  73. Compiler Options
  74. ----------------
  75.  
  76. You can use /Option instead of -Option.
  77.  
  78.     -D Debug:      equivalent to -BVL
  79.     -B deBugcode:  implies -H and also produces debugger calls for 
  80.                    examination of field borders and substrings. 
  81.     -H parcHeck:   produces code for examination of parameter lists 
  82.                    and checks of stack overruns 
  83.     -V Varlist:    List of variables for debugger
  84.     -L Lineslist:  Line number list for debugger
  85.     -U Uppercase:  Changes lower-case into upper case characters (even 
  86.                    in character constants and formats).  Without this 
  87.                    option xy, XY, Xy and xY are four different 
  88.                    variables! 
  89.     -F Free input: Source program is not in FORTRAN format.  Non-standard!
  90.     -P Protocol:   registry of the compiled lines.
  91.     -S Short protocol:  One line per module with the size of the stack 
  92.                    frame and code in bytes. 
  93.     -O One:        produces one output file with name of the first 
  94.                    input file. 
  95.  
  96. Language Summary
  97. ----------------
  98.  
  99. BCC-FORTRAN77 compiles the complete standard from ANSI/ISO. The 
  100. language standard will, however, be violated by several peculiarities 
  101. (mostly these will be called extensions).  I strongly recommend that 
  102. these extensions not be used, since  they are non-standard and hence 
  103. not precisely defined. 
  104.  
  105. The most important of the "peculiarities" are:
  106.  
  107.     INTEGER*1      8 bit INTEGER
  108.     INTEGER*2      16 bit INTEGER
  109.     INTEGER*4      like INTEGER
  110.     LOGICAL*1      8 bit LOGICAL
  111.     LOGICAL*2      16 bit LOGICAL
  112.     LOGICAL*4      like LOGICAL
  113.     IMPLICIT NONE  turns off implicit type definitions
  114.     COMMON /%adr/  Absolute COMMON, adr is a constant or simple 
  115.                    variable which specifies the segment address 
  116.     EQUIVALENCE()  allows character and other types to be mixed in COMMON
  117.     Recursive subroutine calls
  118.     Names with a maximum of 8 characters (the standard is 6).
  119.  
  120. The most important restrictions are:
  121.  
  122.     32kB Code+SAVE/DATA for subroutines
  123.     32kB local data for subroutines (stack frame) 32kB for COMMON 
  124.     (actually 64kB, but the address of the last field must be <32k) 
  125.     700 subroutines per file 500 different COMMON blocks per file 
  126.  
  127. Less important are a series of restrictions where very large 
  128. subroutines give rise to error messages without surpassing the 32kB 
  129. code limit. 
  130.  
  131. Linker
  132. ------
  133.  
  134. The Linker is started by
  135.  
  136.     BCL [-Options...] File...
  137.  
  138. If File doesn't contain a period, a .B will be appended.  The 
  139. executable file will be created with the name of the first file but 
  140. with .EXE substituted for .B.  It must also search the LIB.B file in 
  141. order to link the standard functions and I/O routines. 
  142.  
  143. Example:
  144.  
  145.     BCL -S16 TEST SUB LIB
  146.  
  147. or
  148.  
  149.     BCL -S16 TEST.B SUB.B LIB.B
  150.  
  151. links the files TEST.B and SUB.B into the runnable program TEST.EXE with a 
  152. stack size of 16kB. 
  153.  
  154. Linker Options
  155. --------------
  156.  
  157.     -Sn Stack size will be set to n kB (max 64).  Without this option 
  158.         a 64kB stack will be used.  All local variables and fields for 
  159.         a subroutine will be placed on the stack. 
  160.  
  161.     -O  Optimize:  subroutines which are not called are omitted.
  162.  
  163.     -P  Protocol:  List the COMMON blocks and program modules
  164.  
  165. Restrictions
  166. ------------
  167.  
  168. The most important restriction lies in the size of RAM:  the size of 
  169. the program (without COMMON and stack) can only be as large as the 
  170. largest free memory block after loading BCL.  On the other hand, it is 
  171. possible to produce a program with large COMMONs and stack which will 
  172. not run in the available memory. 
  173.  
  174. The number of subroutines is limited to 3000, the number of COMMON 
  175. blocks to 1500.  (This is a result of the ridiculous 640kB limit of 
  176. MS-DOS.) 
  177.  
  178. Run Time System
  179. ---------------
  180.  
  181. The run time system BCRTSY.EXE contains the routines needed by a 
  182. FORTRAN77 program and must be made memory resident before any 
  183. FORTRAN77 programs are run. 
  184.  
  185. BCRTSY contains:
  186.  
  187.     Arithmetic routines:
  188.       32 bit INTEGER multiplication & division
  189.       REAL arithmetic
  190.       DOUBLE precision arithmetic
  191.       It uses the IEEE floating point format 
  192.       REAL:  7 decimal places, 32 bit 1 bit sign, 8 bit exponent, 24 
  193.          bit mantissa 
  194.       DOUBLE PRECISION:  14 decimal places, 64 bit 1 bit sign, 11 bit 
  195.          exponent, 52 bit mantissa 
  196.       A math coprocessor is not supported. (an 80x87 version exists, 
  197.          but I can't test it since I don't have the necessary 
  198.          hardware.) 
  199.       Character routines
  200.  
  201.     Debugger:
  202.       A simple debugger for finding errors. 
  203.       Also a run time error will give an error message and wait for a 
  204.          command. 
  205.       The debugger can also be activated by a key-stroke interrupting 
  206.       the program's execution if the program was created with the B 
  207.       option.  The following keys are recognized by the debugger as 
  208.       commands: 
  209.  
  210.       T   (Traceback)  Look back through the subroutine call stack and 
  211.           find the next higher module with line number if the program 
  212.           was compiled with the -L option. 
  213.  
  214.       U   (Untrace) Cancel all trace back actions.  This happens 
  215.           automatically when the program is restarted. 
  216.  
  217.       V   Display Variables of the current subroutine with their 
  218.           current contents if the program was compiled with the -V 
  219.           option.  Move into the last displayed program module when T 
  220.           is pressed. 
  221.  
  222.       Z   Terminate program.
  223.  
  224.  <SPACE>  Resume program execution, unless there was a run-time error 
  225.           encountered. 
  226.  
  227.       S   Step program until next label, subprogram ELSE, ENDIF or DO.
  228.  
  229.       C   step subroutine until next CALL or RETURN
  230.  
  231. Library
  232. -------
  233.  
  234. LIB.B contains the full set of mathematical functions prescribed by the 
  235. standard.  If you get an error message when linking e.g. 
  236.  
  237.     External nicht gefunden: f_SQRT
  238.  
  239. then you should place LIB.B on the BCL command line.
  240.  
  241. Running a Program
  242. -----------------
  243.  
  244. Once a program has been linked with BCL it can be run like any other program, 
  245. either from the desktop or from a shell. 
  246.  
  247. Error Messages
  248. --------------
  249.  
  250. The error messages from the compiler, linker and run time system should be 
  251. self-descriptive except for the following exceptions.  The complete listing is 
  252. outside the scope of this description (it takes 26 pages in the handbook of 
  253. Vers.P). 
  254.  
  255.     IO-Error:  Number
  256.     Input/output errors may be intercepted by placing the IOSTAT= parameter in the 
  257. IO statement.  The number has the same value as is returned in the IOSTAT 
  258. variable. 
  259.  
  260.     Number:
  261.  
  262.     -1   End of File
  263.     -2   End of File in middle of record.
  264.     1    File number already in use (OPEN)
  265.     2    Too many files (OPEN). Max. is 32
  266.     3    File name too long (OPEN).  Max is 32 characters.
  267.     5    File number not opened.  Only file numbers 5 and 6 can be 
  268.            used with being OPENed 
  269.     6    formatted/unformatted contradiction
  270.     7    REC parameter for file with ACCESS='SEQUENTIAL'
  271.     8    BACKSPACE, REWIND, ENDFILE are not possible for files AUX: and PRN:
  272.     10   Internal I/O is formatted only
  273.     20   INTEGER overflow
  274.     21   Data error by the listing generator input, e.g. missing 
  275.            apostrophe for a symbol link
  276.     22   unexpected end of data
  277.     23   record too long
  278.     24   UNFORMATTED SEQUENTIAL read error
  279.     30   IO list element doesn't match format element.
  280.            INTEGER needs I format
  281.            REAL, DOUBLE PRECISION (COMPLEX) need one or two F, G, E or 
  282.            D format elements 
  283.     31   Format element L:  T or F expected (input)
  284.     32   format element I: unexpected characters (input). Null 
  285.            characters, signs and numerics allowed. 
  286.     33   format element E, F or D unexpected characters (input
  287.            null characters, signs, numerics, decimal point, E, e, D or 
  288.            d (for the exponent) allowed. 
  289.     34   too many ( in format
  290.     35   too many ) in format
  291.     36   numeric character in a disallowed place in format
  292.     37   illegal format element
  293.     38   decimal point error in F, E, G, or D format element
  294.     39   4Htext or 'text' in format for READ.  In FORTRAN66 this was 
  295.            allowed as a way to read in text but in FORTRAN77 this is 
  296.            no longer allowed. 
  297.     40   exponent too large for the given format.
  298.     42   format element too long.  Must be less than the internal 
  299.            record buffer size (80 characters). 
  300.     43   Internal I/O, record too long.
  301.     44   TL, record too long.  
  302.     45   zero field length in I, L, F, E, G, D format
  303.  
  304.     1000+n MS-DOS Error n
  305.     1002   File not found
  306.     1003   Path not found
  307.     1004   Too many open files
  308.     1005   Access denied
  309.     1008   Not enough free RAM
  310.     1012   Invalid access code
  311.     1015   Invalid disk drive
  312.  
  313. Bugs
  314. ----
  315.  
  316. The 80x87 version has not been tested and can not be supported.
  317.  
  318. Write to me if you find any other kind of errors .
  319.  
  320.  
  321. [Translator's Note:
  322. This is one time I am happy to see terse documentation. Boy, is my German 
  323. rusty! 
  324.  
  325. If any real German speakers have improvements to this translation, especially 
  326. the computer terms (like Ausgabe, Zugriff or Zeichenketten), please 
  327. contact me at the following address and I will incorporate them. 
  328.  
  329. luitje@m-net.ann-arbor.mi.us
  330.  
  331. Here are some usage hints based on my limited experience with this package:
  332.  
  333. - always specify LIB when linking, you'll need it and the linker may crash
  334.   and burn without it.
  335.  
  336. - I compiled a file with mixed upper and lower case variable names and that
  337.   too crashed the linker.  Compiling with -u worked just fine.
  338.  
  339. Here are some translations of compiler error messages I've encountered. 
  340. Doubtless there are many more but you should be able to figure them out.                                
  341.  
  342.  #      Description
  343. ---     -----------
  344. 200     Unrecognized statement
  345. 201     Declaration not allowed here
  346. 203     Multiply defined label
  347. 252     Illegal expression
  348. 253     Equals sign expected
  349. 282     Undefined label
  350.  
  351. The format of the compiler error messages is the error number followed by the 
  352. error description (in German).  On the next line is the string which was being 
  353. scanned when the error was encountered, followed by the line number where the 
  354. error was noticed.
  355.  
  356. Have fun!  --WVL] 
  357.  
  358.